<!DOCTYPE html>
<title>Service Worker: Load flushed script</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/test-helpers.js"></script>
<script>
async_test(function(t) {
    var scope = 'resources/load-flushed-script.html';
    service_worker_unregister_and_register(
        t, 'resources/load-flushed-script.php', scope)
      .then(function(registration) {
          service_worker_unregister_and_done(t, scope);
        })
      .catch(unreached_rejection(t));
  },
  'Don\'t hang while registering a flushed Service Worker script.',
  {timeout: 10000});
</script>
